<?php

namespace App\Winged\Backend;

use App\Winged\Backend\Http\WingedHttp;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

class BackendServiceProvider extends \Illuminate\Support\ServiceProvider
{
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('http',function($app){
            $config = config('winged.backend');
            $channel = $config['http']['channel'];
            $channelConfig = $config['channels'][$channel];
            return new WingedHttp($channelConfig);
        });
    }
    /**
     * Boot the service provider.
     *
     * @return void
     */
    public function boot()
    {
    }
}